package com.lanou3g.code0408.setterandgetter;

/**
 * Created by dllo on 18/4/8.
 */
public class Girl {
    private int age;
    private String name;
    private double weight;

    //set,get方法为以后的改动留接口
    /*
    * 以后记住: 1.类中的所有属性都是 private 的
    *          2.每个属性提供一对setXXX和getXXX的方法,我们叫它 set/get方法
    *          3.set方法用来为这个属性赋值
    *          4.get方法用来获取这个属性的值
    * */

//    //set 设置需要有参数
//    public void setAge(int age) {
//        this.age = age;
//    }
//    //get需要有返回值
//    public int getAge() {
//        return age;
//    }



    //windows: alt + insert
    //mac: command + n

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }







}
